﻿
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Practices.Composite.UnityExtensions;
using Microsoft.Practices.Composite.Modularity;
using Services;

namespace ShellApplication
{
    public class BootStrapper : UnityBootstrapper
    {
      
        protected override DependencyObject CreateShell()
        {
            Shell objShell = new Shell();
            Application.Current.RootVisual = objShell;
            ActivateServices();
            return objShell;
        }

        private void ActivateServices()
        {
            SingletonUnityService.ActivateUnityService(this.Container);
            SingletonRegionService.ActivateRegionService();
        }

        protected override IModuleCatalog GetModuleCatalog()
        {
            ModuleCatalog objCatalog = new ModuleCatalog();
            objCatalog.AddModule(typeof(HeaderContent.HeaderModuleDef));
            objCatalog.AddModule(typeof(FooterContent.FooterModuleDef));
            objCatalog.AddModule(typeof(WelcomeContent.WelcomeModuleDef));
            objCatalog.AddModule(typeof(LoggedInContent.LoggedInModuleDef));
            objCatalog.AddModule(typeof(MenuModule.MenuModuleDef));
            objCatalog.AddModule(typeof(AdminModuleProject.AdminModuleDef));
            return objCatalog;
        }
    }
}
